package gen.kaynak.navitrack.messageProcessStrategy;

import gen.kaynak.navitrack.messageProcessState.*;

public class AlternationCheckWithLetterProcessor implements
		IMessageProcessStrategy {

	@Override
	public boolean ProcessChar(char c, MessageProcessStateManager mpm) {
		if (mpm.getNowProcessing() == "Latitude") {
			if (mpm.signIsNotAssigned()) {
				switch (c) {
				case 'e':
					return true;
				case 'E':
					return true;
				case 'w':
					return true;
				case 'W':
					return true;
				default:
					return false;
				}
			}
		} else if (mpm.getNowProcessing() == "Longitude") {
			if (mpm.signIsNotAssigned()) {
				switch (c) {
				case 'e':
					return true;
				case 'E':
					return true;
				case 'w':
					return true;
				case 'W':
					return true;
				default:
					return false;
				}
			}
		} else {
			return false;
		}
		return false;
	}

}
